(function($, window) {
	//责任人lichen
	var baseRequest = window.baseRequest;
	var appConfig = window.appConfig;
	var commonTool = window.commonTool;
	var dataManager = window.dataManager;
	var baseUrl = appConfig.v3ServiceUrl + '/rrmserver';

	var v3rrmserver = window.v3rrmserver = {};

	//Add by wangyu

	

	//end

	//Add by zhangfuqiang

	//end

	//Add by dingzhibing

	//获取AP环境信息
	v3rrmserver.getApEnvironmentInfo = function(devSN, apList, callback) {
		//{"message":"[rrmserver] You don't have the permission of this device: 210235A1JTB15A000003aa","retCode":false}
		baseRequest.commonPost(baseUrl, {
			Method: "GetApList",
			Param: {
				ACSN: devSN,
				APList: apList
			}
		}, 5000, function(code, data) {
			if(code === 2 || code === 1) {
				return callback(2);
			}
			if(code === 0) {
				//console.log(JSON.stringify(data));
				if(data.retCode) {
					callback(0, data.message);
				} else {
					callback(1);
				}
			}
		});
	}

	//radioType = "2.4G" "5G"
	v3rrmserver.getChlRpt = function(devSN,apName,radioType,callback){
		baseRequest.commonPost(baseUrl, {
			Method: "GetChlRpt",
			Param:{
				ACSN: devSN,
				ApName: apName,
                RadioType: radioType
			}
		}, function(code, data) {
			if(code === 2 || code === 1) {
				return callback(2);
			}
			if(code === 0) {
				if(data.retCode){
					callback(0,data.message);
				}else{
					callback(1);
				}
			}
		});
	}

	//end

	//Add by wuchengcheng

	//end

	//Add by dongyi

	//end

})(mui, window);
